package edu.hrbeu.controller;

import edu.hrbeu.mapper.WebsiteMapper;
import edu.hrbeu.service.WebsiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author wzq
 * @create 2021-12-16-16:17
 */
@Controller
@RequestMapping("/website")
public class WebsiteController {
    @Autowired
    WebsiteService websiteService;

    @GetMapping("/list")
    public String list(Model model) {
        model.addAttribute("websiteList", websiteService.list());
        return "website/list";
    }
}
